<div class="js-offline-message hidden">
  <%= cell("decidim/announcement", t(".cache_version_page"), callout_class: "alert" ) %>
</div>
<script>
  document.addEventListener("turbo:load", () => {
    // show the banner if it is offline AND the offline-fallback is not displaying
    if (!navigator.onLine && !document.querySelector("#offline-fallback-html")) {
      document.querySelector(".js-offline-message").style.display = "block"
    }
  })
</script>
